<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>css/common_zj.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>css/main_zj.css"/>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>js/jquery-1.4.2.min.js"></script>
</head>
<body>
<include file="Common/top" />
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <include file="Common/left" />
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo ADMIN_INDEX;?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">栏目管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="请输入关键字或栏目名称" name="kw" value="<?php echo I('kw');?>" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form  name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="__CONTROLLER__/add"class="btn btn-primary btn2">新增栏目</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i><input form="myform" formaction="__CONTROLLER__/bdel" type="submit" class="btn btn-primary btn2" value="批量删除"/></a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i> <input form="myform" formaction="__CONTROLLER__/sortcate" type="submit"class="btn btn-primary btn2"  value="更新排序"/></a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" id="check"type="checkbox"></th>

                            <th>排序</th>
                            <!--<th>ID</th>-->
                            <th>栏目名称</th>
                            <th>关键词</th>
                            <th>栏目级别</th>
                            <th>描述</th>
                            <!--<th>栏目类型</th>-->
                            <th>缩略图</th>
                            <th>操作</th>
                        </tr>
                        <volist name="cate" id="vo">
                        <tr>
                            <td class="tc"><input name="ids[]" value="{$vo.id}" class="check" type="checkbox"></td>
                            <td>
                                <input class="common-input sort-input" name="{$vo.id}" value="{$vo.sort}" type="text">
                            </td>
                            <!--<td>{$vo.id}</td>-->
                            <td><if condition="$vo['parentid'] neq 0">|</if><?php echo str_repeat('-', $vo['level']*5);?>{$vo.name}</td>

                            <!--<td>-->
                                <!--<if condition="$vo['type'] eq 1 ">列表</if>-->
                                <!--<if condition="$vo['type'] eq 2 ">单页</if>-->
                                <!--<if condition="$vo['type'] eq 3 ">留言板</if>-->
                                <!--<if condition="$vo['type'] eq 4 ">广告</if>-->
                            <!--</td>-->
                            <td><if condition="$vo['keywords'] neq ''">{$vo.keywords}<else />暂无关键词</if></td>
                            <td>
                            <if condition="$vo['class'] eq 1 ">顶级栏目</if>
                            <if condition="$vo['class'] eq 2 ">二级栏目</if>
                            <if condition="$vo['class'] eq 3 ">三级栏目</if>
                            </td>
                            <td><if condition="$vo['des'] neq ''">{$vo.des}<else />暂无描述</if></td>

                            <td><if condition="$vo['pic'] neq ''">
                                <img src="__ROOT__{$vo.pic}" height="70" whit="50"></td>
                            <else />暂无缩略图</if>

                            <td>
                                <a class="link-update" href="__CONTROLLER__/edit/id/{$vo.id}">修改</a>
                                <a class="link-del" onclick="return confirm('确定删除本栏目及其子栏目？');" href="__CONTROLLER__/del/id/{$vo.id}">删除</a>
                            </td>
                        </volist>
                        </tr>
                    </table>
                    <div class="list-page">{$page}</div>
                </div>
            </form>
        </div>
    </div>

</div>
</body>
</html>
<script type="text/javascript">
    $("#check").click(function(){
        if($(this).attr("checked"))
        {
            $(".check").attr("checked","checked")
        }else
        {
            $(".check").removeAttr("checked")
        }
    })
</script>